package tests;


import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import business.Aluno;
import business.CalendarDate;
import business.Matricula;
import business.Perfil;

public class MatriculaTest {

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}
	
	@Test
	public void validConstruct(){
		Matricula a = new Matricula(new Aluno(), new Perfil(), new CalendarDate()); 
	}
	
	@Test (expected=AssertionError.class)
	public void invalidConstruct(){
		Matricula a = new Matricula(null, null, null); 
	}
	
	@Test
	public void validSetAluno(){
		Matricula a = new Matricula();
		a.setAluno(new Aluno());
	}
	
	@Test (expected=AssertionError.class)
	public void invalidSetAluno(){
		Matricula a = new Matricula(); 
		a.setAluno(null);
	}
	
	@Test
	public void validSetPerfil(){
		Matricula a = new Matricula();
		a.setPerfil(new Perfil());
	}
	
	@Test (expected=AssertionError.class)
	public void invalidSetPerfil(){
		Matricula a = new Matricula();
		a.setPerfil(null);
	}
	
	@Test
	public void validSetDate(){
		Matricula a = new Matricula();
		a.setDataInscricao(new CalendarDate());
	}
	
	@Test (expected=AssertionError.class)
	public void invalidSetDate(){
		Matricula a = new Matricula();
		a.setDataInscricao(null);
	}
	
	@Test
	public void pagarTester(){
		Matricula m = new Matricula();
		m.pagar();
	}
	
	@Test
	public void toStringTester(){
		Matricula m = new Matricula();
		m.setAluno(new Aluno());
		m.setDataInscricao(new CalendarDate());
		m.setPerfil(new Perfil());
		m.toString();
	}
	
	@Test
	public void objectTester(){
		Matricula.objectos();
	}
	
	@Test
	public void resetTester(){
		Matricula.reset();
	}
	
	@Test
	public void setterTester(){
		Matricula m = new Matricula();
		m.setAluno(new Aluno());
		m.setDataInscricao(new CalendarDate());
		m.setPaga(false);
		m.setPerfil(new Perfil());
	}
	
	@Test
	public void getterTester(){
		Matricula m = new Matricula();
		m.getAluno();
		m.getClass();
		m.getDataInscricao();
		m.getPaga();
		m.getPerfil();
	}
	

}
